Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
After having some thought on the current abstraction model I have decided to make the abstraction much looser to allow for more provider-led customizations. In particular the filters in GrowthBook form general expressions and are not tied to per context property filtering. This should allow more flexibility in driving features within Excos Platform and enable me to incorporate more 3rd party feature providers.
Breaking Changes
IFeatureVariantOverride
in order for the client to not be concerned with feature overrides. Those should be implemented via other means (e.g. a customILoadContextualOptions
)FeatureMetadata
type that was used for injecting resolved variants as part of the options has been removed. Instead user should call theIFeatureEvaluation
interface to get the list of resolved variants and their Ids.ExcosOptions
class has been removed. InsteadUserId
is the default allocation unit for configuration provided features. You can no longer set the default globally.Testing
I had some unit tests and they gave some confidence, but I feel like I could have missed something, so I may need to add more tests.
Performance
By changing the abstraction model of filters and then pushing in on the
IOptionsContext
constraint, I was able to redesign how filtering is executed for the configuration based provider. Excos.Options is now in the same ballpark as Microsoft.FeatureManagement.Object pools have been removed as they don't seem to be adding much positive value (allocations stay in gen 0).
GrowthBook
I was able to properly implement the GB specification (with some caveats) so now most of the unit tests are actually passing. The ones that don't have been listed in the comment as exceptions with explanations why my implementation differs.
Docs
I've updated the GB Guide and Usage docs to reflect the changes.